<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <?php foreach($list as $val) { ?>
            <div class="col-sm-6 col-md-6 col-lg-6">
                <a  href="<?=url('miniappshop/miappdetail',['miniapp_id'=>$val->miniapp_id,'member_miniapp_id'=>$member_miniapp_id])?>" >
                <div class="widget style1 mininapp"    style="background-color: #ffffff">
                    <div class="row">
                        <div class="col-sm-4 col-lg-4">
                            <img  alt="image" class="img-responsive" src="/attachs/uploads/<?=$val->photo?>">
                        </div>
                        <div class="col-sm-8 col-lg-8 text-left" style="">
                            <h2 style=" margin-bottom: 1%;" class="font-bold"><?=$val->title?></h2>
                            <p>服务周期 <b>:</b><a class="btn btn-white btn-bitbucket" style="margin-left: 2%; border-color: #00a0e9"><?=config('setting.service_day')?>天</a></p>
                            <p>模板价格 <b>:</b><span style="color: red;margin-left: 2%"> 活动价：￥<?= sprintf("%.2f",$val->price/100)?></span><span style="margin-left: 10px; color: #c0c0c0;text-decoration:line-through">（原价：￥<?= sprintf("%.2f",$val->activity_price/100)?>元）</span></p>
                            <?php if(!empty($agent[$member->type])) {?>
                                   <p><?=$agent[$member->type]['name']?><b>:</b><span style="color: red;margin-left: 2%"> ：￥<?= sprintf("%.2f",$val->price * ($agent[$member->type]['discount']/100) /100)?></span></p>
                            <?php } ?>
                            <?php if(isset($buys[$val->miniapp_id])){?>
                            <?php if($buys[$val->miniapp_id]['expir_time']<$nowtime){?>
                             <p>模板状态 <b>:</b><span class="badge-warning">已过期</span></p>
                            <?php }elseif($buys[$val->miniapp_id]['expir_time']<$tixing){?>
                            <p>模板状态 <b>:</b><span class="badge-warning">即将到期</span></p>

                            <?php }else{?>
                            <p>模板状态 <b>:</b><span class="badge-success">正常使用</span></p>
                            <?php }?>
                            
                            <?php }else{?>
                            <p>模板状态   <b>:</b><span class="badge-white">未获得</span></p>
                            <?php }?>
                        </div>
                    </div>
                </div>
                  </a>
            </div>
                                   
        <?php } ?>
    </div>
</div>
